/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pruebas;

import edu.ucuenca.ec.amazonnosqlfinal.test2.cluster.*;
import org.neo4j.cypher.ExecutionEngine;
import org.neo4j.cypher.ExecutionResult;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Transaction;

/**
 *
 * @author pablo
 */
public abstract class AbstractNeo4jCluster {
    GraphDatabaseService graphDb;
	ExecutionEngine engine;

	public void executeQuery(String query) {
		ExecutionResult result;

		try (Transaction ignored = graphDb.beginTx()) {
                   // System.out.println("es server "+);
                        
			result = engine.execute(query);
                        engine.compiler();
			System.out.println(result.dumpToString());
		}

	}
}
